package net.bw.realtime.jtp.service;

import org.bw.realtime.jtp.bean.*;
import org.bw.realtime.jtp.mapper.TotalAmountCntMapper;
import org.bw.realtime.jtp.mapper.TradeProvinceMapper;
import org.bw.realtime.jtp.mapper.TradeSkuSourceMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.Collections;
import java.util.List;

/**
 * @Author: lianyuez
 * @Date: 2025/6/5
 */

@Service
public class TradeOrderServiceImpl implements TradeOrderService {


	@Autowired
	TotalAmountCntMapper totalAmountCntMapper;

	@Override
	public Double getTotalOrderCnt(String date) {
		return totalAmountCntMapper.selectTotalOrderCnt(date);
	}

	@Override
	public Double getTotalAmount(String date) {
		return totalAmountCntMapper.selectTotalAmountCnt(date);
	}

	@Autowired
	TradeProvinceMapper tradeProvinceMapper;

	@Override
	public List<ProvinceAmountBean> getProvinceAmount(String date) {
		return tradeProvinceMapper.selectProvinceAmount(date);
	}

	@Override
	public List<ProvinceAmountRankBean> getProvinceAmountRank(String date) {
		return tradeProvinceMapper.selectProvinceAmountRank(date);
	}

	@Override
	public List<ProvinceCntRankBean> getProvinceCntRank(String date) {
		return tradeProvinceMapper.selectProvinceCntRank(date);
	}

	@Autowired
	TradeSkuSourceMapper tradeSkuSourceMapper;

	@Override
	public List<SourceAmountBean> getSourceAmount(String date) {
		return tradeSkuSourceMapper.selectSourceAmount(date);
	}

	@Override
	public List<SkuCntBean> getSkuCnt(String date) {
		return tradeSkuSourceMapper.selectSkuCnt(date);
	}

	@Override
	public List<SkuAmountBean> getSkuAmount(String date) {
		return tradeSkuSourceMapper.selectSkuAmount(date);
	}
}
